<?php 
class index_models_index extends CI_Model{
	public function __construct(){
		$this->load->database();
	}
    public function  total_annonces(){
    	$get= $this->db->select('count(*) as total')->
    	from('product')->where(array('prd_active'=>1))->get();
    	 $row=$get->result();
    	 return $row[0];
    
    }
   
}